﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;


namespace Dragoon
{
  /// <summary>
  /// The Environment updates the effect parameters to cuase movement in the clouds and so on
  /// </summary>
  public class Environment : EffectComponent
  {
    Vector3 windDirection = new Vector3(0, 0, 1);

    public Environment(Game game)
      : base(game)
    {
    }

    public override void Draw(GameTime gameTime)
    {
      float time = (float)gameTime.TotalGameTime.TotalMilliseconds / 1000.0f;
      _effect.Parameters["xTime"].SetValue(time);
      _effect.Parameters["xWindForce"].SetValue(0.02f);
      _effect.Parameters["xWindDirection"].SetValue(windDirection);
    }
  }
}